<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title> {$action} | {:get_opinion('title')}</title>

    <include file="Public:head"/>

</head>
<body class="skin-blue">

{:W('Common/header')}

<div class="wrapper row-offcanvas row-offcanvas-left">
    {:W('Common/sideMenu')}


    <!-- Right side column. Contains the navbar and content of the page -->
    <aside class="right-side">
        <!-- Content Header (Page header) -->


        <section class="content-header">
            <h1>
                {$action}
                <small>{$Think.config.title}</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{$module_url}"><i class="fa fa-dashboard"></i> {$module}</a></li>
                <li class="active">{$action}</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <div class="row">
                <div class="col-md-12">
                    <div class="box box-warning">
                        <div class="box-header">
                            <h3 class="box-title">{$action}</h3>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">


                            <div class="clearfix">

                            </div>
                            <table class="table table-striped table-bordered table-hover"
                                   id="sample_1">
                                <thead>
                                <tr>
                                    <th style="width: 8px;"><input type="checkbox"
                                                                   class="group-checkable"
                                                                   id="check-all"         data-set="#sample_1 .checkboxes"/></th>
                                    <th class="col-md-3">标题</th>
                                    <th style="width:100px;">作者</th>
                                    <th>分类 与 标签</th>
                                    <th class="col-md-2">发布日期</th>
                                    <th class="col-md-3">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <foreach name="posts" item="v">
                                    <tr class="odd gradeX">
                                        <td><input type="checkbox" class="checkboxes" value="1"/></td>
                                        <td><a href="{:U('Admin/Posts/posts', array('id' => $v[post_id]))}"
                                               title="{$v.post_title}">{$v.post_title}</a></td>
                                        <td>
                                            <a href="{:U('Admin/access/editAdmin', array('aid' => $v['post_user']['user_id']))}">{$v.post_user.user_nicename}</a>
                                        </td>
                                        <td>


                                            分类:
                                            <volist name="v['post_cat']" id="v_pcs" empty="无分类"  offset="0"  length='5'>
                                                <a class="btn btn-default btn-sm" href="{:U('Admin/Posts/category', array('id' => $v_pcs['cat_id']))}">{$v_pcs['cat_name']}</a>&nbsp;&nbsp;
                                            </volist>

                                            标签:
                                            <volist name="v['post_tag']" id="v_pts" empty="无标签"  offset="0"  length='5' >
                                                <a class="btn btn-default btn-sm" href="{:U('Admin/Posts/tag', array('id' => $v_pts['tag_id']))}">{$v_pts['tag_name']}</a>&nbsp;&nbsp;

                                            </volist>

                                        </td>
                                        <td>{:getTimestamp($v['post_date'],'Y-m-d H:i') }</td>
                                        <td>
                                            <a class="btn btn-sm btn-primary" href="{:U('Admin/Posts/posts', array('id' => $v['post_id']))}">编辑</a>
                                            &nbsp;

                                            <control access="Admin/Posts/NOVERIFY">

                                                <a class="btn btn-sm btn-info" href="{:U('Admin/Posts/unverifiedHandle', array('id' => $v[post_id],'post_status'=>'reverify'))}">不通过</a>
                                                &nbsp;
                                                <a class="btn btn-sm btn-success" href="{:U('Admin/Posts/unverifiedHandle', array('id' => $v[post_id]))}">通过</a>
                                                &nbsp;
                                                <a class="btn btn-sm btn-danger" href="{:U('Admin/Posts/preDel', array('id' => $v[post_id]))}">删除</a>

                                            </control>


                                        </td>

                                    </tr>

                                </foreach>
                                </tbody>
                            </table>


                        </div>
                    </div>
                </div>
            </div>


        </section>
        <!-- /.content -->
    </aside>
    <!-- /.right-side -->
</div>
<!-- ./wrapper -->

<include file="Public:foot"/>

</body>
</html>